/*
* created by Administrator on 2018/12/4
* 好的代码像粥一样,是得用时间和精力熬的。
*/
Vue.filter('toGender',function(value){
    return value ? '男':'女';
});
let app = new Vue({
    el:'#root',
    data:{
        userData:Mock.mock({
            'data|10':[{
                name:'@cname',
                gender:'@boolean',
                city:'@city',
                phoneNumber:/^1[345789]\d{9}$/,
                age: '@integer(16,30)',

            }]}).data,
        msg:'hello,world!',
        htmlTag:'<h2>123234325436</h2>',
        username:'',
        isLogIn:false,
        href:'https://www.baidu.com',
        hrefname:'baidu',
        isActive:true,
    },
    methods:{
        clickToDel(index){
            this.userData.splice(index,1);
        },
        fn(){
            console.log(this.username);
        }
    }
})
